In graph theory, the metric k-center, is a combinatorial optimization problem studied in theoretical computer science. Given n cities with specified distances, one wants to build k warehouses in different cities and minimize the distance of the farthest city from its closest warehouse. In graph theory this means finding a set of k vertices for which the largest distance of any point to its closest vertex in the k-set is minimum. The vertices must be in a metric space, or in other words a complete graph that satisfies the triangle inequality.
Contents |
Given a complete undirected graph G = (V, E) with distances d(vi, vj) ∈ N satisfying the triangle inequality, find a subset S ⊆ V with |S| = k while minimizing:
If we sort the edges in nondecreasing order of the distances: d(e1) ≤ d(e2) ≤ … ≤ d(em) and let Gi = (Vi, Ei), where Ei = {e1, e2, …, ei}. The k-center problem is equivalent to finding the smallest index i such that Gi has a dominating set of size at most k.[1] Dominating set is NP-complete and therefore the k-center problem is also NP-complete.
A simple greedy approximation algorithm that achieves an approximation factor of 2 builds S in k iterations. The first iteration chooses an arbitrary vertex and adds it to S. Each subsequent iteration chooses a vertex v for which d(S, v) is maximized and adds v to S. The running time of the algorithm is O(nk).[2]
Another algorithm with the same approximation factor takes advantage of the fact that the k-center problem is equivalent to finding the smallest index i such that Gi has a dominating set of size at most k and computes a maximal independent set on the of Gi, looking for the smallest index i that has a maximal independent set with a size of at least k.[3]
It is not possible to find an approximation algorithm with an approximation factor of 2 − ε for any ε > 0.[4] Furthermore, the distances of all edges in G must satisfy the triangle inequality if the k-center problem is to be approximated unless P = NP.[5]